﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace ST.Buz.Base.Entity
{
	/// <summary>
	/// 发票信息表
	/// </summary>
	[Table("Sys_Invoice")]
	public partial class Sys_Invoice
	{
		[Key]
		[Column("ID")]
		public int ID { get; set; }

		/// <summary>
		/// 发票类型,1:普通发票,2:增值税专用发票
		/// </summary>
		[Column("Type")]
		public int Type { get; set; }

		/// <summary>
		/// 单位名称
		/// </summary>
		[Column("CompanyName")]
		[StringLength(80, ErrorMessage = "{0}长度不能超过{1}")]
		public string CompanyName { get; set; }

		/// <summary>
		/// 纳税人识别码
		/// </summary>
		[Column("TaxCode")]
		[StringLength(30, ErrorMessage = "{0}长度不能超过{1}")]
		public string TaxCode { get; set; }

		/// <summary>
		/// 注册地址
		/// </summary>
		[Column("DetailAddress")]
		[StringLength(100, ErrorMessage = "{0}长度不能超过{1}")]
		public string DetailAddress { get; set; }

		/// <summary>
		/// 注册电话
		/// </summary>
		[Column("Phone")]
		[StringLength(20, ErrorMessage = "{0}长度不能超过{1}")]
		public string Phone { get; set; }

		/// <summary>
		/// 开户银行
		/// </summary>
		[Column("BankName")]
		[StringLength(80, ErrorMessage = "{0}长度不能超过{1}")]
		public string BankName { get; set; }

		/// <summary>
		/// 银行账户
		/// </summary>
		[Column("BankNo")]
		[StringLength(30, ErrorMessage = "{0}长度不能超过{1}")]
		public string BankNo { get; set; }

		/// <summary>
		/// 创建时间
		/// </summary>
		[Column("AddDate")]
		public DateTime AddDate { get; set; }

		/// <summary>
		/// 创建人ID
		/// </summary>
		[Column("AddManID")]
		[JsonIgnore]
		public int AddManID { get; set; }

		/// <summary>
		/// 创建人
		/// </summary>
		[Column("AddManName")]
		[StringLength(20, ErrorMessage = "{0}长度不能超过{1}")]
		public string AddManName { get; set; }

		/// <summary>
		/// 
		/// </summary>
		[Column("OrgID")]
		public int OrgID { get; set; }
	}
}
